<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class BaseController extends Controller
{
    //成功返回
    public function reSuJson($msg,$data=''){
        return response()->json(['code'=>200,'msg'=>$msg,'data'=>$data]);
    }
    //失败返回
    public function reErJson($msg,$code=1000,$rcode=401){
        return response()->json(['code'=>$code,'msg'=>$msg],$rcode);
    }
}
